function [A, b] = processing_boundary_condition_1d(A, b, node, bdary, function_cor, function_g, function_r)

%% Neuman
for k = 1:size(bdary,2)
    if bdary(1,k) == 2
        normal_direction = bdary(3,k);
        i = bdary(2,k);
        b(i) = b(i) + normal_direction*function_r(node(i))*function_cor(node(i));
    end
end

%% Dirichlet
for k = 1:size(bdary,2)
    if bdary(1,k) == 0
        i = bdary(2,k);
        A(i,:) = 0;
        A(i,i) = 1;
        b(i) = function_g(node(i));
    end
end

end